#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QVector>

#include "reseau.h"


namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void setMessage(QString message);
    QString getMessage();
    void keyPressEvent(QKeyEvent * event);
    //QString getPseudo();
    void setListPseudo(QVector<QString> listPseudo);

    void setReseau(Reseau *r);
    void setPseudo(QString pseudo);
    void closeEvent(QCloseEvent *event);
private:
    Ui::MainWindow *ui;
    Reseau *r;
    QVector<QString> m_listPseudo;
    QTcpSocket *m_socket;
    QString pseudo;

private slots:
    void donneesRecues();
    void erreurSocket(QAbstractSocket::SocketError erreur);
    void on_annuler_clicked();
};

#endif // MAINWINDOW_H
